import urllib

from google.appengine.api import urlfetch

from secrets import GOOGLE_DOC_URL

def post_user_data(name, email, zip, phone):
    user_data = urllib.urlencode({
        'entry.0.single': name,
        'entry.2.single': email,
        'entry.3.single': zip,
        'entry.4.single': phone
    })

    return urlfetch.fetch(url=GOOGLE_DOC_URL, payload=user_data, method=urlfetch.POST)

